package com.ruoyi.exam.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.exam.mapper.ExamProvinceGradeMapper;
import com.ruoyi.exam.domain.ExamProvinceGrade;
import com.ruoyi.exam.service.IExamProvinceGradeService;

/**
 * 省份信息Service业务层处理
 * 
 * @author wky
 * @date 2024-09-09
 */
@Service
public class ExamProvinceGradeServiceImpl implements IExamProvinceGradeService 
{
    @Autowired
    private ExamProvinceGradeMapper examProvinceGradeMapper;

    /**
     * 查询省份信息
     * 
     * @param gradeId 省份信息主键
     * @return 省份信息
     */
    @Override
    public ExamProvinceGrade selectExamProvinceGradeByGradeId(Long gradeId)
    {
        return examProvinceGradeMapper.selectExamProvinceGradeByGradeId(gradeId);
    }

    /**
     * 查询省份信息列表
     * 
     * @param examProvinceGrade 省份信息
     * @return 省份信息
     */
    @Override
    public List<ExamProvinceGrade> selectExamProvinceGradeList(ExamProvinceGrade examProvinceGrade)
    {
        return examProvinceGradeMapper.selectExamProvinceGradeList(examProvinceGrade);
    }

    /**
     * 新增省份信息
     * 
     * @param examProvinceGrade 省份信息
     * @return 结果
     */
    @Override
    public int insertExamProvinceGrade(ExamProvinceGrade examProvinceGrade)
    {
        examProvinceGrade.setCreateTime(DateUtils.getNowDate());
        return examProvinceGradeMapper.insertExamProvinceGrade(examProvinceGrade);
    }

    /**
     * 修改省份信息
     * 
     * @param examProvinceGrade 省份信息
     * @return 结果
     */
    @Override
    public int updateExamProvinceGrade(ExamProvinceGrade examProvinceGrade)
    {
        return examProvinceGradeMapper.updateExamProvinceGrade(examProvinceGrade);
    }

    /**
     * 批量删除省份信息
     * 
     * @param gradeIds 需要删除的省份信息主键
     * @return 结果
     */
    @Override
    public int deleteExamProvinceGradeByGradeIds(Long[] gradeIds)
    {
        return examProvinceGradeMapper.deleteExamProvinceGradeByGradeIds(gradeIds);
    }

    /**
     * 删除省份信息信息
     * 
     * @param gradeId 省份信息主键
     * @return 结果
     */
    @Override
    public int deleteExamProvinceGradeByGradeId(Long gradeId)
    {
        return examProvinceGradeMapper.deleteExamProvinceGradeByGradeId(gradeId);
    }
}
